+Fri Mar 12 15:06:44 2004 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkexpander.c (gtk_expander_realize): Create the
+ event_window at the right size using the same logic as
+ in size_allocate. (#136994, Niklas Knuttson)
+
2004-03-12 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkwindow.c (gtk_window_activate_focus): Don't ignore the
+Fri Mar 12 15:06:44 2004 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkexpander.c (gtk_expander_realize): Create the
+ event_window at the right size using the same logic as
+ in size_allocate. (#136994, Niklas Knuttson)
+
2004-03-12 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkwindow.c (gtk_window_activate_focus): Don't ignore the
+Fri Mar 12 15:06:44 2004 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkexpander.c (gtk_expander_realize): Create the
+ event_window at the right size using the same logic as
+ in size_allocate. (#136994, Niklas Knuttson)
+
2004-03-12 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkwindow.c (gtk_window_activate_focus): Don't ignore the
+Fri Mar 12 15:06:44 2004 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkexpander.c (gtk_expander_realize): Create the
+ event_window at the right size using the same logic as
+ in size_allocate. (#136994, Niklas Knuttson)
+
2004-03-12 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkwindow.c (gtk_window_activate_focus): Don't ignore the
+Fri Mar 12 15:06:44 2004 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkexpander.c (gtk_expander_realize): Create the
+ event_window at the right size using the same logic as
+ in size_allocate. (#136994, Niklas Knuttson)
+
2004-03-12 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkwindow.c (gtk_window_activate_focus): Don't ignore the
static void gtk_expander_activate (GtkExpander *expander);
+static void get_expander_bounds (GtkExpander *expander,
+ GdkRectangle *rect);
+
static GtkBinClass *parent_class = NULL;
GType
GdkWindowAttr attributes;
gint attributes_mask;
gint border_width;
+ GdkRectangle expander_rect;
priv = GTK_EXPANDER (widget)->priv;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
border_width = GTK_CONTAINER (widget)->border_width;
-
+
+ get_expander_bounds (GTK_EXPANDER (widget), &expander_rect);
+
attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x + border_width;
- attributes.y = widget->allocation.y + border_width;
- attributes.width = widget->allocation.width - 2 * border_width;
- attributes.height = widget->allocation.height - 2 * border_width;
+ attributes.y = expander_rect.y;
+ attributes.width = MAX (widget->allocation.width - 2 * border_width, 1);
+ attributes.height = expander_rect.width;
attributes.wclass = GDK_INPUT_ONLY;
attributes.event_mask = gtk_widget_get_events (widget) |
GDK_BUTTON_PRESS_MASK |